from django.db.models import Model, CharField, SlugField, TextField
from django.contrib import admin

class Note(Model):
    title = CharField(max_length=100)
    slug = SlugField()
    text = TextField(blank=True,null=True)

    def __unicode__(self):
        return u"Note(%s,%s)" % (self.title, self.slug)

    def get_absolute_url(self):
        return u"/note/%s/" % self.slug

admin.site.register(Note)
